IModel.RelateAll method

Namespace: NextDesign.Core

Description

Associates the given model with all reference fields that can be associated with the given model of this instance and returns a collection of all the associated instances that have been added. If a deleted model or temporary proxy is specified for the model to be associated, association will not be performed. Returns an empty collection if no association was made.

This method excludes fields that do not meet the following constraints: [Constraint to evaluate] - Path constraint - Type constraints - Multiplicity limit - Operation availability

argument

Name Type Description
opposite IModel The model to associate
null cannot be specified.

Return value

  • IRelationshipCollection

Exception

Name Exception Class Description
Invalid argument ExtensionArgumentException If null is specified for opposite
Illegal operation ExtensionInvalidOperationException If the model itself is a deleted proxy or temporary proxy